import { head } from 'lodash'

export default {
  backgroundColor: '#1c213e',
  tooltip: {
    position: 'top',
    formatter: function(val) {
      const { value } = val
      return head(value) ? head(value) : ''
    }
  },
  visualMap: {
    show: false
  },
  calendar: [
    {
      orient: 'vertical',
      top: 30,
      left: 15,
      right: 15,
      bottom: 15,
      cellSize: 40,
      yearLabel: {
        show: false
      },
      monthLabel: {
        color: '#fff',
        nameMap: 'cn',
        show: false
      },
      dayLabel: {
        color: '#fff',
        firstDay: 1,
        nameMap: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
        margin: 5
      },
      itemStyle: {
        color: '#212948',
        borderColor: '#31597d',
        borderType: 'dashed'
      },
      splitLine: {
        lineStyle: {
          color: '#31597d'
        }
      }
    }
  ],
  series: [
    {
      type: 'scatter',
      coordinateSystem: 'calendar',
      symbolSize: 10
    }
  ]
}
